package com.example.sp01.entity;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(name = "sg")
public class sg {
    @Id
    @Column(name = "Sno")
    private Integer sno;
    
    @Id
    @Column(name = "Gno")
    private Integer gno;
    
    @Column(name = "Gname")
    private String gname; // 组名

    public sg() {}

    public sg(Integer sno, Integer gno, String gname) {
        this.sno = sno;
        this.gno = gno;
        this.gname = gname;
    }

    // Getter和Setter
    public Integer getSno() {
        return sno;
    }

    public void setSno(Integer sno) {
        this.sno = sno;
    }

    public Integer getGno() {
        return gno;
    }

    public void setGno(Integer gno) {
        this.gno = gno;
    }

    public String getGname() {
        return gname;
    }

    public void setGname(String gname) {
        this.gname = gname;
    }
}